package com.app.megaprosoft.modyimcarcare;

import java.util.ArrayList;

import com.app.megaprosoft.DB.Item;
import com.app.megaprosoft.DB.ItemGroup;
import com.app.megaprosoft.DB.ItemGroupMain;
import com.app.megaprosoft.DB.ItemPrice;
import com.app.megaprosoft.DB.SQLiteDBClass;
import com.app.megaprosoft.DB.ServicePOS;
import com.app.megaprosoft.general.DateTime;
import com.app.megaprosoft.general.Number;
import com.megaprosoft.modyimcarcare.R;

import android.os.Bundle;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.GridView;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.Toast;


public class Carcare_Service extends Activity {
	
	SQLiteDBClass 					myDb;
	private Animation 				shake;
	
	private Double 					_totalpriceall,
									_priceall,
									_discountall,
									_totalprice,
									_discount,
									_price;
	private int						_duration,
									_qty;
	private String 					Data_ItemGroupMain[][],
									Data_ItemGroup[][],
									Data_Item[][],
									ListPOS[][],
									ListItem[][];
	private TextView 				tv_service_priceall,
									tv_service_totalpriceall,
									tv_service_discount,
									tv_carsize,
									tv_cargroup,
									tv_item,
									tv_numitem;
	GridView 						GV_ItemGroupMain;
	ListView 						LV_ItemGroup,
									Carcare_PaysListView;
	Button 							bt_selectall,
									bt_delete,
									bt_unmark,
									bt_clear,
									bt_save,
									bt_cash,
									bt_credit,
									bt_member;
	
	// Itemgroupmain
	private String 					ItemGroupMainOID,
									ItemGroupMainCode,
									ItemGroupMainDesc;
	// Itemgroup
	private String 					ItemGroupOID,
									ItemGroupCode,
									ItemGroupDesc;
	// ItemPrice
	private String 					ItemPriceOID,
									CarTypeOID,
									CarSizeOID,
									CarGroupOID,
									ItemOID,
									ItemPrice,
									CarGroupName,
									CarSizeName,
									CarTypeName,
									ItemCode,
									ItemName;
	// ItemStock					
	private String 					Duration;
	//Inten
	private String 					FFUserOID,
									ArCode,
									CarSize,
									POSDocOID,
									POSList,
									ListQty,
									ListPrice,
									ListTotal,
									ListDiscount,
									Service_discount,
									Service_total,
									Service_ReceiveMoney,
									Service_NetTotalAmount;
	
	private CarCare_Adapter_ListPay carcare_pay_adapter;
	
	private String 					ServiceID="106201310070001";
	private Boolean 				ServiceMode=false;
	
	//Function
	ServicePOS servicepos = new ServicePOS();
	Item item = new Item();
	ItemGroup itemgroup = new ItemGroup();
	ItemGroupMain itemgroupmain = new ItemGroupMain();
	ItemPrice itemprice =new ItemPrice();
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		super.onCreate(savedInstanceState);
		setContentView(R.layout.a_carcare_activity_service);
		
		servicepos.setContext(getApplicationContext());
		item.setContext(getApplicationContext());
		itemgroup.setContext(getApplicationContext());
		itemgroupmain.setContext(getApplicationContext());
		itemprice.setContext(getApplicationContext());
		
		shake = AnimationUtils.loadAnimation(this, R.anim.shake);
		myDb = new SQLiteDBClass(this);
		//textview
		tv_carsize = (TextView) findViewById(R.id.tv_carcare_carsize);
		tv_cargroup = (TextView) findViewById(R.id.tv_carcare_cargroup);
		tv_item= (TextView) findViewById(R.id.tv_carcare_item);
		tv_numitem = (TextView) findViewById(R.id.tv_carcare_numitem);
		
		tv_service_priceall = (TextView) findViewById(R.id.tv_service_priceall);
		tv_service_totalpriceall = (TextView) findViewById(R.id.tv_service_totalpriceall);
		tv_service_discount = (TextView) findViewById(R.id.tv_service_discount);
		//button 
		bt_selectall = (Button) findViewById(R.id.a_service_bt_selectall);
		bt_selectall.setOnClickListener(ButtonCheckall);
		bt_delete = (Button) findViewById(R.id.a_service_bt_delete);
		bt_delete.setOnClickListener(Buttondelete);
		bt_clear = (Button) findViewById(R.id.a_service_bt_clear);
		bt_clear.setOnClickListener(ButtonClear);
		bt_unmark = (Button) findViewById(R.id.a_service_bt_unmark);
		bt_unmark.setOnClickListener(ButtonUnmark);
		bt_cash = (Button) findViewById(R.id.a_service_cash);
		bt_cash.setEnabled(false);
		bt_credit = (Button) findViewById(R.id.a_service_credit);
		bt_credit.setEnabled(false);
		bt_member = (Button) findViewById(R.id.a_service_member);
		bt_member.setEnabled(false);
		bt_save = (Button) findViewById(R.id.a_service_save);
		bt_save.setOnClickListener(ButtonSave);
		//View
		GV_ItemGroupMain  = (GridView)findViewById(R.id.carcare_service_itemgroupmain);
		LV_ItemGroup = (ListView) findViewById(R.id.carcare_service_itemgroup);
		Carcare_PaysListView = (ListView) findViewById(R.id.carcare_service_item);
		
		Bundle bundle = getIntent().getExtras();
		if (bundle != null) {
			setFFUserOID((String) bundle.get("FFUserOID"));
			setArCode((String) bundle.get("ArCode"));
			setCarSizeOID((String) bundle.get("CarSize"));
			tv_carsize.setText(getCarSizeOID());
			setCarGroupOID((String) bundle.get("CarGroupOID"));
			tv_cargroup.setText((String) bundle.get("CarGroup"));
			setPOSDocOID((String) bundle.get("POSDocOID"));
		}
		
		Init();
	}
	
	@Override
	protected void onResume() {
		// TODO Auto-generated method stub
		super.onResume();
		servicepos.setContext(getApplicationContext());
	}
	
	
	public void Init(){
		Define_ListOrder();
		Define_ItemGroupMain();
	}
	
	public void Define_ListOrder(){
		tv_service_priceall.setText("0");
		tv_service_totalpriceall.setText("0");
		tv_service_discount.setText("0");
		
		carcare_pay_adapter = new CarCare_Adapter_ListPay(Carcare_Service.this, 
				R.layout.list_pay, new ArrayList<CarCare_List_Payment>());
		Carcare_PaysListView.setAdapter(carcare_pay_adapter);
		
		_discountall=0.0;
		_priceall=0.0;
		_totalpriceall=0.0;
		_price= 0.0;
		_discount=0.0;
		_totalprice=0.0;
		_duration = 0;
		_qty= 0;
		try{
			ListPOS = servicepos.SelectAll_ServicePOSList(getPOSDocOID(),"0","");
//			ListPOS = myDb.SelectAll_ServicePOSList("");
			int length = ListPOS.length;
			tv_numitem.setText(String.valueOf(length));
			for(int i=0;i<length;i++){
				_qty = Integer.valueOf(ListPOS[i][3]);
				_price = Double.valueOf(Number.unCommaReturnDouble(ListPOS[i][4]));
				_discount = Double.valueOf(Number.unCommaReturnDouble(ListPOS[i][6]));
				_totalprice = Double.valueOf(Number.unCommaReturnDouble(ListPOS[i][5]));
				
				//Duration
				
				int tem_dulation=0;
				int tem_qty=0;
				try{
					String data[][] = itemprice.SelectAll_ItemPrice("", ListPOS[i][2], "", "");
					String data2[][] = item.SelectAll_Item("",data[0][4]);
//					Toast.makeText(getApplicationContext(),"itemoid : " + data[0][4], Toast.LENGTH_SHORT).show();
					tem_dulation = Integer.valueOf(data2[0][47].toString());
//					Toast.makeText(getApplicationContext(),"tem_dulation : " + data2[0][47], Toast.LENGTH_SHORT).show();
				}catch(Exception e){
//					Toast.makeText(getApplicationContext(),"tem_dulation : EE ", Toast.LENGTH_SHORT).show();
					tem_dulation= 0;
				}
				try{
					tem_qty = Integer.valueOf(ListPOS[i][3]);
				}catch(Exception e){
					tem_qty= 1;
				}
				_duration = _duration + (tem_dulation*tem_qty);
				
				
				
				
				Boolean checked ;
				if(ListPOS[i][19].equals("1")){
					checked=true;
				}else{
					checked=false;
				}
				carcare_pay_adapter.add(new CarCare_List_Payment(checked, ListPOS[i][15], 
																		ListPOS[i][3], 
																		Number.addComma(_price, 2), 
																		Number.addComma(_discount, 2), 
																		Number.addComma(_totalprice, 2),
																		ListPOS[i][2]));	
				_discountall = _discountall+_discount;
				_priceall = _priceall+(_price*_qty);
				_totalpriceall = _priceall-_discountall;
			}
			tv_service_priceall.setText(Number.addComma(_priceall, 2));
			tv_service_totalpriceall.setText(Number.addComma(_totalpriceall, 2));
			tv_service_discount.setText(Number.addComma(_discountall, 2));
			setService_total(Number.addComma(_priceall, 2));
			setService_discount(Number.addComma(_discountall, 2));
			setService_ReceiveMoney("0.00");
			setService_NetTotalAmount(Number.addComma(_totalpriceall, 2));
			setDuration(String.valueOf(_duration));
			Toast.makeText(getApplicationContext(),"Duration : " + getDuration(), Toast.LENGTH_SHORT).show();
		}catch(Exception e){
		}
	}
	private Boolean Checkitem(String itemid){
		try{
			ListPOS = servicepos.SelectAll_ServicePOSList(getPOSDocOID(),"0","");
			int length = ListPOS.length;	
			for(int i=0;i<length;i++){
				if(ListPOS[i][2].equals(itemid)){
					setPOSList(ListPOS[i][0].toString());
					
					setListDiscount(ListPOS[i][6].toString());
					setListPrice(ListPOS[i][4].toString());
					setListQty(ListPOS[i][3].toString());
					setListTotal(ListPOS[i][5].toString());
					return true;
				}
			}
		}catch(Exception e){
			return false;
		}
		return false;
	}
	
	public void Define_ItemGroupMain(){
		try {
			Data_ItemGroupMain = itemgroupmain.SelectAll_ItemGroupMain();
			
			GV_ItemGroupMain.setAdapter(new CarCare_Adapter_ItemGroupMain(this,Data_ItemGroupMain));
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		
		GV_ItemGroupMain.setOnItemClickListener(new OnItemClickListener() {
			public void onItemClick(AdapterView<?> parent, View v,
				int position, long id) {
				setItemGroupMainOID(Data_ItemGroupMain[position][0].toString());
				setItemGroupMainCode(Data_ItemGroupMain[position][1].toString());
				setItemGroupMainDesc(Data_ItemGroupMain[position][2].toString());
				if(ServiceID.equals(getItemGroupMainOID())){
					ServiceMode=true;
				}else{
					ServiceMode=false;
				}
				Define_ItemGroup();//GroupItem
//				tv.setText(getItemGroupMainOID());
			}
		});}
	
	
	public void Define_ItemGroup(){
		Data_ItemGroup = itemgroup.SelectAll_ItemGroup(ItemGroupMainOID);   
        LV_ItemGroup.setAdapter(new CarCare_Adapter_ItemGroup(this,Data_ItemGroup));
        // OnClick
        LV_ItemGroup.setOnItemClickListener(new OnItemClickListener() {
			public void onItemClick(AdapterView<?> parent, View v,
				int position, long id) {
				try{
					setItemGroupOID(Data_ItemGroup[position][0].toString()); 
					setItemGroupCode(Data_ItemGroup[position][1].toString()); 
					setItemGroupDesc(Data_ItemGroup[position][1].toString()); 
					Define_Item();//Item
				}catch(Exception e){
				}
			}
		});
	}
	public void Define_Item(){
		if(ServiceMode){
			Data_Item = itemprice.SelectAll_ItemPrice(ItemGroupOID,"",getCarSizeOID(),getCarGroupOID());   
		    LV_ItemGroup.setAdapter(new CarCare_Adapter_ItemPrice(this,Data_Item));
	        // OnClick
	        LV_ItemGroup.setOnItemClickListener(new OnItemClickListener() {
				public void onItemClick(AdapterView<?> parent, View v,
					int position, long id) {
					try{
						setItemPriceOID	(Data_Item[position][0].toString());
						setCarTypeOID	(Data_Item[position][1].toString()); 
						setCarSizeOID	(Data_Item[position][2].toString()); 
						setCarGroupOID	(Data_Item[position][3].toString()); 
						setItemOID		(Data_Item[position][4].toString()); 
						setItemPrice	(Data_Item[position][5].toString());
						
						setCarGroupName	(Data_Item[position][6].toString()); 
						setCarSizeName	(Data_Item[position][7].toString()); 
						setCarTypeName	(Data_Item[position][8].toString()); 
						setItemCode		(Data_Item[position][9].toString()); 
						setItemName		(Data_Item[position][10].toString()); 
						tv_item.setText("> "+getItemName());
						if(!Checkitem(getItemPriceOID())){
							try{
								servicepos.InsertServicePOSLists(DateTime.getDateNowymd()+DateTime.getTimeNowss(), 
						    			getPOSDocOID(), getItemPriceOID(), "1", getItemPrice(), getItemPrice(), 
						    			"0", "0", "", "", "", 
						    			"", "", "", "", getItemName(), 
						    			getFFUserOID(), DateTime.getDateTimeNow(), DateTime.getDateTimeNow(), "0", "0");
							}catch(Exception e){
								
							}
						}else{
							try{
								int Qty = Integer.valueOf(getListQty())+1;
								
								double Price = Double.valueOf(Number.unCommaReturnDouble(getListPrice()));
								double Discount = Double.valueOf(Number.unCommaReturnDouble(getListDiscount()));
								double TotalAmount = Double.valueOf(Number.unCommaReturnDouble(getListTotal()));
								
								TotalAmount = (Price*Qty)-Discount;
										
								servicepos.UpdateItemServicePOSLists( getPOSList(), 
															String.valueOf(Qty) , 
															String.valueOf(Price), 
															String.valueOf(TotalAmount), 
															String.valueOf(Discount));
								
							}catch(Exception e){
								
							}
							
						}
						Define_ListOrder();
//						carcare_pay_adapter.add(new CarCare_List_Payment(false,getItemName(), 1, Double.valueOf(getItemPrice()), 0, Double.valueOf(getItemPrice()),getItemPriceOID()));
					
						
					}catch(Exception e){
//						 Toast.makeText(getApplicationContext(),
//									"ERROR: " + Data_user[position][8].toString(), Toast.LENGTH_SHORT).show();
					}
				}
			});
	        
		}else{
			Data_Item = item.SelectAll_Item(ItemGroupOID,"");   
			LV_ItemGroup.setAdapter(new CarCare_Adapter_Item(this,Data_Item));
	        // OnClick
	        LV_ItemGroup.setOnItemClickListener(new OnItemClickListener() {
				public void onItemClick(AdapterView<?> parent, View v,
					int position, long id) {
					try{
						setItemOID		(Data_Item[position][0].toString()); 
						setItemPrice	(Data_Item[position][48].toString()); 
		
						setItemName		(Data_Item[position][2].toString()); 
						tv_item.setText("> "+getItemName());
						
						if(!Checkitem(getItemOID())){
							try{
								servicepos.InsertServicePOSLists(DateTime.getDateNowymd()+DateTime.getTimeNowss(), 
						    			getPOSDocOID(), getItemOID(), "1", getItemPrice(), getItemPrice(), 
						    			"0", "0", "", "", "", 
						    			"", "", "", "", getItemName(), 
						    			getFFUserOID(), DateTime.getDateTimeNow(), DateTime.getDateTimeNow(), "0", "0");
							}catch(Exception e){
								
							}
						}else{
							try{
								int Qty = Integer.valueOf(getListQty())+1;
								
								double Price = Double.valueOf(Number.unCommaReturnDouble(getListPrice()));
								double Discount = Double.valueOf(Number.unCommaReturnDouble(getListDiscount()));
								double TotalAmount = Double.valueOf(Number.unCommaReturnDouble(getListTotal()));
								
								TotalAmount = (Price*Qty)-Discount;
										
								servicepos.UpdateItemServicePOSLists( getPOSList(), 
															String.valueOf(Qty) , 
															String.valueOf(Price), 
															String.valueOf(TotalAmount), 
															String.valueOf(Discount));
								
							}catch(Exception e){
								
							}
						}
					
						Define_ListOrder();
//						carcare_pay_adapter.add(new CarCare_List_Payment(false,getItemName(), 1, Double.valueOf(getItemPrice()), 0, Double.valueOf(getItemPrice()),getItemPriceOID()));
					
						
					}catch(Exception e){
//						 Toast.makeText(getApplicationContext(),
//									"ERROR: " + Data_user[position][8].toString(), Toast.LENGTH_SHORT).show();
					}
				}
			});
		} 
    
	}

	
	 private OnClickListener ButtonCheckall = new OnClickListener() {
	        public void onClick(View v) {
	        	try{
	    			ListPOS = servicepos.SelectAll_ServicePOSList(getPOSDocOID(),"0","");
	    			int length = ListPOS.length;	
	    			for(int i=0;i<length;i++){
	    				servicepos.UpdateStatusServicePOSLists(	ListPOS[i][0],
	    													"1", 
	    													"0");
	    			}
	    		}catch(Exception e){
	    		}
	        	Define_ListOrder();

	        }
	 }; 
	 private OnClickListener ButtonUnmark = new OnClickListener() {
	        public void onClick(View v) {
//	        	carcare_pay_adapter.clear();
	        	try{
	    			ListPOS = servicepos.SelectAll_ServicePOSList(getPOSDocOID(),"0","");
	    			int length = ListPOS.length;	
	    			for(int i=0;i<length;i++){
	    				servicepos.UpdateStatusServicePOSLists(	ListPOS[i][0],
	    													"0", 
	    													"0");
	    			}
	    		}catch(Exception e){
	    		}
	        	Define_ListOrder();
	        	
	        }
	 };
	 private OnClickListener ButtonClear = new OnClickListener() {
	        public void onClick(View v) {
//	        	carcare_pay_adapter.clear();
	        	try{
	    			ListPOS = servicepos.SelectAll_ServicePOSList(getPOSDocOID(),"0","");
	    			int length = ListPOS.length;	
	    			for(int i=0;i<length;i++){
	    				servicepos.UpdateStatusServicePOSLists(	ListPOS[i][0],
	    													"0", 
	    													"1");
	    			}
	    		}catch(Exception e){
	    		}
	        	Define_ListOrder();
	        	
	        }
	 };
	 
	 private OnClickListener Buttondelete = new OnClickListener() {
	        public void onClick(View v) {
	        	
	        	try{
	        		ListPOS = servicepos.SelectAll_ServicePOSList(getPOSDocOID(),"0","");
		        	int length = ListPOS.length;
		        	for(int i=0;i<length;i++){
		        		if(carcare_pay_adapter.getItem(i).isSelected()){
		        			servicepos.UpdateStatusServicePOSLists(	ListPOS[i][0],
																"0", 
																"1");
		        		}
		        	}
	        	}catch(Exception e){
	        		
	        	}
	        	
	        	Define_ListOrder();
	        	
	        }
	 };
	 
	 private OnClickListener ButtonSave = new OnClickListener() {
	        public void onClick(View v) {
	        	servicepos.UpdateServicePOSstatusUpdateByDoc(	
	        										getPOSDocOID(), 
	        										"0", 
	        										"0");
	        	try {
					String data[][] = servicepos.SelectAll_ServicePOS("", getPOSDocOID(), "");
					int time = DateTime.convertTime(data[0][5])+Integer.valueOf(getDuration());
//					Toast.makeText(getApplicationContext(),"time1 : " + time, Toast.LENGTH_SHORT).show();
//					Toast.makeText(getApplicationContext(),"time2 : " + settime(time), Toast.LENGTH_SHORT).show();
					setDuration(settime(time));
				} catch (Exception e) {
					// TODO Auto-generated catch block
					setDuration("");
				}
	        	servicepos.UpdatePriceAndDuration(	getPOSDocOID(), 
	        										getDuration(), 
	        										getService_total(), 
	        										getService_discount(), 
	        										getService_ReceiveMoney(), 
	        										getService_NetTotalAmount(), 
	        										"0");
	        	  finish();
//	        	onBackPressed();
	        }
	 };
	 
	 private String settime(int time){
		 String HH1,mm1;
		 int HH = time/60;
		 int mm = (time%60);
		 if(HH<10){
			HH1="0"+String.valueOf(HH);
		 }else{
			HH1=String.valueOf(HH);
		 }
		 if(mm<10){
			mm1="0"+String.valueOf(mm);
		 }else{
			mm1=String.valueOf(mm);
		 }
		 return HH1+":"+mm1;
	 }
	 
	  //------------------------ Exit ------------------------------------------//
	  	
	    @Override
		public void onBackPressed() {
		  
		        new AlertDialog.Builder(this)
		        .setTitle("บันทึก")
		        .setIcon(R.drawable.erroralert)
		        .setMessage("ต้องบันทึกการทำรายการ")
		                .setNegativeButton(android.R.string.yes, new DialogInterface.OnClickListener() {

		                    public void onClick(DialogInterface arg0, int arg1) {
		                        finish();
		                    }
		                })
		                .setPositiveButton(android.R.string.no, new DialogInterface.OnClickListener() {

		                    public void onClick(DialogInterface arg0, int arg1) {
		                    	
		                    }
		                }).create().show();
		} 
		
	 
	 	//Get Set
	 
		public String getItemGroupMainOID() {
			return ItemGroupMainOID;
		}

		public void setItemGroupMainOID(String itemGroupMainOID) {
			ItemGroupMainOID = itemGroupMainOID;
		}

		public String getItemGroupMainCode() {
			return ItemGroupMainCode;
		}

		public void setItemGroupMainCode(String itemGroupMainCode) {
			ItemGroupMainCode = itemGroupMainCode;
		}

		public String getItemGroupMainDesc() {
			return ItemGroupMainDesc;
		}

		public void setItemGroupMainDesc(String itemGroupMainDesc) {
			ItemGroupMainDesc = itemGroupMainDesc;
		}

		public String getItemGroupOID() {
			return ItemGroupOID;
		}

		public void setItemGroupOID(String itemGroupOID) {
			ItemGroupOID = itemGroupOID;
		}

		public String getItemGroupCode() {
			return ItemGroupCode;
		}

		public void setItemGroupCode(String itemGroupCode) {
			ItemGroupCode = itemGroupCode;
		}

		public String getItemGroupDesc() {
			return ItemGroupDesc;
		}

		public void setItemGroupDesc(String itemGroupDesc) {
			ItemGroupDesc = itemGroupDesc;
		}

		public String getItemPriceOID() {
			return ItemPriceOID;
		}

		public void setItemPriceOID(String itemPriceOID) {
			ItemPriceOID = itemPriceOID;
		}

		public String getCarTypeOID() {
			return CarTypeOID;
		}

		public void setCarTypeOID(String carTypeOID) {
			CarTypeOID = carTypeOID;
		}

		public String getCarSizeOID() {
			return CarSizeOID;
		}

		public void setCarSizeOID(String carSizeOID) {
			CarSizeOID = carSizeOID;
		}

		public String getCarGroupOID() {
			return CarGroupOID;
		}

		public void setCarGroupOID(String carGroupOID) {
			CarGroupOID = carGroupOID;
		}

		public String getItemOID() {
			return ItemOID;
		}

		public void setItemOID(String itemOID) {
			ItemOID = itemOID;
		}

		public String getItemPrice() {
			return ItemPrice;
		}

		public void setItemPrice(String itemPrice) {
			ItemPrice = itemPrice;
		}

		public String getCarGroupName() {
			return CarGroupName;
		}

		public void setCarGroupName(String carGroupName) {
			CarGroupName = carGroupName;
		}

		public String getCarSizeName() {
			return CarSizeName;
		}

		public void setCarSizeName(String carSizeName) {
			CarSizeName = carSizeName;
		}

		public String getCarTypeName() {
			return CarTypeName;
		}

		public void setCarTypeName(String carTypeName) {
			CarTypeName = carTypeName;
		}

		public String getItemCode() {
			return ItemCode;
		}

		public void setItemCode(String itemCode) {
			ItemCode = itemCode;
		}

		public String getItemName() {
			return ItemName;
		}

		public void setItemName(String itemName) {
			ItemName = itemName;
		}

		public String getFFUserOID() {
			return FFUserOID;
		}

		public void setFFUserOID(String fFUserOID) {
			FFUserOID = fFUserOID;
		}

		public String getArCode() {
			return ArCode;
		}

		public void setArCode(String arCode) {
			ArCode = arCode;
		}

		public String getCarSize() {
			return CarSize;
		}

		public void setCarSize(String carSize) {
			CarSize = carSize;
		}

		public String getPOSDocOID() {
			return POSDocOID;
		}

		public void setPOSDocOID(String pOSDocOID) {
			POSDocOID = pOSDocOID;
		}

		public String getPOSList() {
			return POSList;
		}

		public void setPOSList(String pOSList) {
			POSList = pOSList;
		}

		public String getListQty() {
			return ListQty;
		}

		public void setListQty(String listQty) {
			ListQty = listQty;
		}

		public String getListPrice() {
			return ListPrice;
		}

		public void setListPrice(String listPrice) {
			ListPrice = listPrice;
		}

		public String getListTotal() {
			return ListTotal;
		}

		public void setListTotal(String listTotal) {
			ListTotal = listTotal;
		}

		public String getListDiscount() {
			return ListDiscount;
		}

		public void setListDiscount(String listDiscount) {
			ListDiscount = listDiscount;
		}

		public String getService_discount() {
			return Service_discount;
		}

		public void setService_discount(String service_discount) {
			Service_discount = service_discount;
		}

		public String getService_total() {
			return Service_total;
		}

		public void setService_total(String service_total) {
			Service_total = service_total;
		}

		public String getService_ReceiveMoney() {
			return Service_ReceiveMoney;
		}

		public void setService_ReceiveMoney(String service_ReceiveMoney) {
			Service_ReceiveMoney = service_ReceiveMoney;
		}

		public String getService_NetTotalAmount() {
			return Service_NetTotalAmount;
		}

		public void setService_NetTotalAmount(String service_NetTotalAmount) {
			Service_NetTotalAmount = service_NetTotalAmount;
		}

		public String getDuration() {
			return Duration;
		}

		public void setDuration(String duration) {
			Duration = duration;
		}
		
		
		
		
		
		
		
		
		
		
}
